--ngx.arg[1]是输出块内容
local chunk = ngx.arg[1]   
if string.match(chunk, "hello") then
     ngx.arg[2] = true  -- 设置为true，表示输出结束 eof 
     return
end

-- just throw away any remaining chunk data
ngx.arg[1] = nil
